﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using CMISLibrary.Entities;
using BCNPCObject.DB;

namespace BCNPCObject
{
    public class cs_pc1_bieu18_Controller
    {
        #region   Atributes

        //private DataSet CMIS_Header = new CMISOutputParameter();
        private DataSet ds = new DataSet();
        private DataTable dt = new DataTable();
        private PC1_BCKD18 info;

        #endregion

        #region   Constructor

        public cs_pc1_bieu18_Controller()
        {
            info = new PC1_BCKD18();
        }
        public cs_pc1_bieu18_Controller(PC1_BCKD18 Info)
        {
            this.info = Info;
        }

        #endregion

        #region   Properties

        public PC1_BCKD18 pInfor
        {
            get { return info; }
            set { info = value; }
        }

        #endregion

        #region   Methods
        /// <summary>
        /// tung lam
        /// </summary>
        /// <returns></returns>
        public IEnumerable<PC1_BCKD18> select_PC1_BCKD18(String strMa_dviqly, int p_thang, int p_nam)
        {
            try
            {
                CMIS2.ResetDB();
                var q = from p in CMIS2.DB.PC1_BCKD18
                        where p.MA_DVIQLY == strMa_dviqly && p.NAM == p_nam && p.THANG == p_thang
                        orderby p.STT
                        select p;
                return q;

                //var q = from p in CMIS2.DB.PC1_D_BCKD select p;
                //return q;
            }
            catch
            {
                CMIS2.ResetDB(); return null;
            }
        }
        /// <summary>
        /// /-----------------
        /// </summary>
        /// <returns></returns>


        #endregion

    }
}
